signature DIGRAPH =
sig
  structure Node :
  sig
    type 'a t
    
    val addSuccessor : 'a t * 'a t -> unit    
    val equals : 'a t * 'a t -> bool
    val new : unit -> 'a t
    val plist : 'a t -> PropertyList.t
    val successors : 'a t -> 'a t list
  end
  
  type 'a t
  
  val addEdge : 'a t * {from : 'a Node.t, to : 'a Node.t} -> unit
  val addNode : 'a t * 'a Node.t -> unit
  val calculateDf : 'a t * 'a Node.t * ('a Node.t -> 'a Node.t list) *
                    ('a Node.t * 'a Node.t list -> unit) * ('a Node.t -> string) -> unit
  val dfs : 'a t * 'a Node.t * ('a Node.t -> unit) -> unit
  val dfsTree : 'a t * 'a Node.t * ('a Node.t -> 'b) -> 'b Tree.t
  val dominatorTree : 'a t * 'a Node.t * ('a Node.t -> 'b) * ('a Node.t -> string) -> 'b Tree.t
  val foreachNode : 'a t * ('a Node.t -> unit) -> unit
  val hasEdge : 'a t * {from : 'a Node.t, to : 'a Node.t} -> bool
  val predecessors : 'a t * 'a Node.t -> 'a Node.t list
  val lookup : 'a t * ('a Node.t -> bool) -> 'a Node.t
  val new : unit -> 'a t
  val newNode : 'a t -> 'a Node.t
  val nodes : 'a t -> 'a Node.t list
  val numNodes : 'a t -> int
  val reachable : 'a t * 'a Node.t -> 'a Node.t list
  val reverse : 'a t * ('a Node.t -> 'b) * ('b * 'b -> bool) * ('a Node.t -> string)
                -> {graph : 'b t, getLabel : 'b Node.t -> 'b}
  val toDot : 'a t * string * ('a Node.t -> string) -> unit
end